-- background: 2703 from stack: in.0 -- bmap block id: 3276 -- flags: 4000 -- background id: 0 -- name: The Collection ----- HyperTalk script ----- --•• SYSTEM MESSAGES on openBackground global firstTimeAGS,artManagement if artManagement then admin else closeAdmin setLibraryButtons if firstTimeAGS is empty then set cursor to watch send mouseUp to bg btn "graphics view" checkDocuments initializeVars put 1 into firstTimeAGS end if if hilite of bg btn "help" then set hilite of bg btn "help" to false end openBackground on openCard global listScroll,currentView setCdNo if cantModify of this stack then setView if currentView is "lists view" then fillInFields set scroll of fld "list" to listScroll end if unlock screen end openCard on closeCard global listScroll lock screen put the scroll of fld "list" into listScroll end closeCard --• MESSAGE HANDLERS on setLibraryButtons get cd fld "Library title" of cd "Title card" if the number of words in it < 2 then exit setLibraryButtons get word 1 of it if it is not "Hardware" then set hilite of bg btn "Hardware" to false if it is not "Technical" then set hilite of bg btn "Technical" to false if it is not "Networks" then set hilite of bg btn "Networks" to false if hilite of bg btn it is false then set hilite of bg btn it to true end setLibraryButtons on goStack whichStack global findParams,lastFindTerms dialogIt "Sorry. This version contains hardware graphics only." exit goStack if the hilite of bg btn whichStack then exit goStack set lockMessages to true set lockRecent to true lock screen put the long name of this stack into startStack go stack "Apple Graphics - " & whichStack if the long name of this stack is startStack then -- You clicked cancel and didn't leave the original stack exit goStack end if go bg "the collection" unlock screen with visual effect dissolve openBackground openCard put empty into findParams put empty into lastFindTerms end goStack -- The next couple of handlers manage the paths to the graphics. This -- is critical since DispPict and TinyPict use the paths stored in the -- paths field on the Documents card of the Home path to find a given -- graphic file. on updateDocuments newPaths --Updates the global documents. The newPaths parameter is optional, --and is paths that need to be added to the Documents card in the --Home stack. global documents if cantModify of this stack then exit updateDocuments lock screen set lockRecent to true set lockMessages to true push cd go home go cd "documents" if the result is not empty then --the Documents card in the Home stack doesn't appear to exist. dialogIt "The stack is having trouble locating the" && "Documents card in the Home stack. Consequently, the stack" && "may have trouble finding the original graphics." pop cd exit updateDocuments else --the Documents card in the Home stack was found. if newPaths is NOT empty then put newPaths into line (the number of lines in fld "paths" + 1) of fld "paths" end if end if put fld "paths" into documents pop cd end updateDocuments on checkDocuments newPaths --Checks the document paths in this stack against the global --Documents. Discrepencies are put into newPaths and sent to the --handler updateDocuments to be added to the Documents card in the --Home stack. NewPaths is optional, and allows you to add paths to --the storage field in this stack. global documents put cd fld "paths to graphics" of cd "Index storage" into existPaths if newPaths is not empty then repeat with N = 1 to the number of lines in newPaths if not isWithin(line N of newPaths,existPaths) then put line N of newPaths into line (the number of lines in existPaths + 1) of existPaths end if end repeat put existPaths into cd fld "paths to graphics" of cd "Index storage" end if put empty into newPaths repeat with N = 1 to the number of lines in existPaths if not isWithin(line N of existPaths,documents) then put line N of existPaths into line (the number of lines in newPaths + 1) of newPaths end if end repeat if newPaths is not empty then updateDocuments newPaths end checkDocuments --• MENU SCRIPTS on buildMenus buildCatalogMenu buildIndexesMenu buildManagementMenu buildCardMenu end buildMenus on buildCatalogMenu global catalogMenu put empty into catalogMenu put "Catalog Folder…" & return after catalogMenu put "Catalog File…" & return after catalogMenu if cantModify of this stack then repeat with i = 1 to the number of lines in catalogMenu put "(" before line i of catalogMenu end repeat end if end buildCatalogMenu on buildIndexesMenu global indexesMenu put empty into indexesMenu put "Build All Indexes" & return after indexesMenu put "(-" & return after indexesMenu put "Build Keyword Index" & return after indexesMenu put "Add to Keyword Index…" & return after indexesMenu put "Delete from Keyword Index…" & return after indexesMenu put "Export Keyword Index" & return after indexesMenu put "(-" & return after indexesMenu put "Build Book Index" & return after indexesMenu put "Add to Book Index…" & return after indexesMenu put "Delete from Book Index…" & return after indexesMenu put "Export Book Index" & return after indexesMenu put "(-" & return after indexesMenu put "Build File Name Index" & return after indexesMenu put "Build File Format Index" & return after indexesMenu if cantModify of this stack then repeat with i = 1 to the number of lines in indexesMenu put "(" before line i of indexesMenu end repeat end if end buildIndexesMenu on buildManagementMenu global managementMenu put empty into managementMenu put "Import Data…" & return after managementMenu put "Delete Data" & return after managementMenu put "(-" & return after managementMenu put "Set Browsing Speed…" & return after managementMenu put "Sort by File Name" & return after managementMenu put "Print Cards from Book…" & return after managementMenu if cantModify of this stack then repeat with i = 1 to the number of lines in managementMenu put "(" before line i of managementMenu end repeat end if end buildManagementMenu on buildCardMenu global cardMenu put empty into cardMenu put "Build Thumbnail" & return after cardMenu put "Format Description" & return after cardMenu put "(-" & return after cardMenu put "Assign Keyword…" & return after cardMenu put "Delete Keyword…" & return after cardMenu put "(-" & return after cardMenu put "Assign Book…" & return after cardMenu if cantModify of this stack then repeat with i = 1 to the number of lines in cardMenu put "(" before line i of cardMenu end repeat end if end buildCardMenu on sortCards if not the lockMessages then answer "Sort graphics by File Name?" with Cancel or OK if it is "cancel" then exit sortCards end if put "Sorting cards …" toggleLockScreen push cd set cursor to busy get the number of this bg sort by backgroundSort(it) put empty pop cd end sortCards on changeView whichView global currentView,listScroll set cursor to watch lock screen if whichView is "lists view" then put true into boolean put "lists view" into currentView put "iris close" into theEffect showListName fillInFields set scroll of fld "list" to listScroll else put false into boolean put "graphics view" into currentView put "iris open" into theEffect end if -- ABOUT THIS GRAPHIC view set visible of bg btn "description:" to not boolean set visible of fld "description field" to not boolean set visible of bg btn "format:" to not boolean set visible of fld "format field" to not boolean set visible of bg btn "file name:" to not boolean set visible of fld "file name field" to not boolean set visible of bg btn "keywords:" to not boolean set visible of fld "keywords field" to not boolean set visible of bg btn "appears in books:" to not boolean set visible of fld "appears in books field" to not boolean set visible of bg btn "info blanket" to not boolean set visible of bg btn "Hardware" to not boolean set visible of bg btn "Technical" to not boolean set visible of bg btn "Networks" to not boolean -- LISTS view set visible of bg btn id 353 to boolean --the name of the open list set visible of fld "list" to boolean set visible of bg btn "new list" to boolean set visible of bg btn "open list…" to boolean set visible of bg btn "save" to boolean set visible of bg btn "delete list…" to boolean set visible of bg btn "print list…" to boolean set visible of bg btn "add this graphic" to boolean set visible of bg btn "delete #…" to boolean deleteEntryVisible false setBtnHilites unlock screen with visual effect theEffect end changeView on setBtnHilites global currentView if currentView is "lists view" then put true into boolean else put false into boolean set hilite of bg btn "lists view" to boolean set hilite of bg btn "graphics view" to not boolean end setBtnHilites on deleteEntryVisible boolean if boolean then put "Click an entry to remove it from the list." into fld "delete msg" else set hilite of bg btn "done" to true set hilite of bg btn "done" to false end if lock screen if not boolean then put empty into fld "delete msg" --set visible of bg btn id 407 to boolean set visible of bg fld "delete msg" to boolean set visible of bg btn "done" to boolean unlock screen end deleteEntryVisible on showNew newGraphics,text put sortContainer(newGraphics) into theList get listDialog(theList,13,text,"No","OK") end showNew on showExisting theList put "These cards already existed and weren't added." into text get listDialog(theList,13,text,"No","OK",601) end showExisting on showHelp boolean lock screen set the showPict of this card to not(boolean) set the visible of fld "banner" to boolean set the visible of bg btn "Help Section" to boolean set the visible of bg btn "Help Close" to boolean set the hilite of bg btn "Help" to boolean if boolean then unlock screen with zoom open else put empty into fld "banner" unlock screen with zoom close end if end showHelp on setView global currentView if currentView is "ags lists" then send mouseUp to bg btn "lists view" showListName else send mouseUp to bg btn "graphics view" end setView on removeCdPict put the tool into toolStatus choose select tool doMenu "select all" doMenu "clear picture" choose toolStatus end removeCdPict on controlKey whichKey -- keyboard shortcuts using the control key. -- whichKey is the ASCII code for the key hit with the control key -- 1 is the letter a. if whichKey = 1 then send mouseUp to bg btn "add this graphic" -- 4 is the letter d. if whichKey = 4 then deleteFromCard "keyword","keywords field","Keyword Index","keyword pointer" end if -- 4 is the letter f. if whichKey = 6 then put formatDescription(bg fld "description field") into bg fld "description field" end if -- 11 is the letter k. if whichKey = 11 then assignToCard "keyword","keywords field","Keyword Index","keyword pointer" end if pass controlKey end controlKey on initializeVars global listScroll,taggedList,changesToList,activeListName, ticksToWait,listStack,lastWindow,displayOrPrint,entrySuffix, entryPrefix,tryServers put false into changesToList put 0 into listScroll put empty into taggedList put "Untitled" into activeListName put " | " into entryPrefix put ". | " into entrySuffix put cd fld "browsing speed" of cd "Index storage" into ticksToWait if ticksToWait = empty then put 0 into ticksToWait put "Graphics Database Lists" into listStack put "5,21,484,291" into lastWindow put "1" into displayOrPrint if cantModify of this stack then put false into tryServers else put true into tryServers end initializeVars on adminElements boolean set cursor to watch lock screen buildMenus put developerBtns() into theBtns if boolean then put "barn door open" into theEffect repeat with N = 1 to the number of items in theBtns set hilite of bg btn (item N of theBtns) to false end repeat else put "barn door close" into theEffect repeat with N = 1 to the number of items in theBtns set visible of bg btn (item N of theBtns) to boolean end repeat if boolean AND the loc of cd window = "0,0" then hide menubar else show menubar unlock screen with theEffect end adminElements on fillInFields global taggedList put taggedList into bg fld "list" end fillInFields on setCdNo put bgCard() into bgCard set the name of bg btn id 216 to bgCard && "of" && (the number of cds in this bg) end setCdNo --•• GRAPHICS scripts on displayPicture global lastWindow, displayOrPrint,tryServers set cursor to busy show menuBar put item 1 of lastWindow into left put item 2 of lastWindow into top put item 3 of lastWindow into right put item 4 of lastWindow into bottom if tryServers then mountFileServer lock screen set lockRecent to true set lockMessages to true if cantModify of this stack then put buildPicturePath() into fileName else put fld "file name field" into fileName DispPICT fileName,displayOrPrint,1,left,top,right,bottom,0,0,0 put the result into XCMDanswer -- the result is either the coordinates of the graphic window when it was -- closed or an error message if xcmdAnswer contains "error" then dispPictError "displayPicture",xcmdAnswer,fileName else put xcmdAnswer into lastWindow openCard end displayPicture on displayTiny whichPath global tryServers set cursor to watch if tryServers then mountFileServer if whichPath = empty then put fld "file name field" into whichPath set lockMessages to true set lockRecent to true tinyPICT whichPath,200,200 put the result into xcmdAnswer if xcmdAnswer contains "error" then dispPictError "displayTiny",xcmdAnswer,whichPath openCard return xcmdAnswer exit displayTiny end if if cardPictureExists() then dialogIt "Replace the existing thumbnail for this card?","No,Yes" if the result = "No" then exit displayTiny end if lock screen choose select tool drag from 0,0 to 300,300 doMenu "Clear Picture" type "V" with commandKey drag from 25,25 to 50,90 doMenu "select" -- to get rid of opaque paint choose browse tool unlock screen end displayTiny on dispPictError initialHandler, xcmdAnswer, whichFile if xcmdAnswer contains "File not found" then addThisPath initialHandler end if if xcmdAnswer contains "Not enough memory" then dialogIt "There is not enough memory to open the file" &"e& whichFile "e& "." end if if xcmdAnswer contains "File could not be opened" then -- this file is not in a format we can handle dialogIt "The file" &"e& whichFile "e&& "is stored in a file format this stack doesn't support." && "The file can't be opened." end if if xcmdAnswer contains "user cancelled operation" then --the user hit command-period to cancel end if end dispPICTerror on addThisPath initialHandler put line 1 of fld "file name field" into graphicID if graphicID = empty then dialogIt "Since the File Name field is empty, the original" && "file could not be accessed." exit addThisPath end if put FileName("","Where is the file" && quote & graphicID & quote & "?") into longName if longName = empty then exit addThisPath put getShortName(longName) into fileName put getPath(longName) into folderPath updateDocuments folderPath put initialHandler &"e& fileName "e into executeThis do executeThis end addThisPath on copyThumbnail put the userLevel into userStatus if the userLevel < 3 then set the userLevel to 3 put the tool into toolStatus choose select tool --or any paint tool doMenu "select" type "C" with commandKey choose toolStatus set the userLevel to userStatus end copyThumbnail on mountFileServer global tryServers -- thanks to Landon Dyer for the Mount XCMD put listVol() into volumeNames if not isWithin("Graphics Source",volumeNames) then Mount "Apple Graphics", "Apple Graphics Source", "Graphics Source" if the result <> empty then put false into tryServers --the parameters are zone name, server name, volume name -- if the volume wasn't found, Mount puts a message into the result end if end mountFileServer --•• FIND scripts on findKWSetup whichText global lastFindTerms if the optionKey is up then put true into goForward else put false into goForward put "with the keyword" into dialogPhrase put whichText into lastFindTerms findAGS dialogPhrase,"keywords field","keyword pointer","keyword index",goForward end findKWSetup on findBookSetup whichText --This handler AGS only. global lastFindTerms if the optionKey is up then put true into goForward else put false into goForward put "from the book" into dialogPhrase put whichText into lastFindTerms findAGS dialogPhrase,"appears in books field","book pointer","book index",goForward end findBookSetup on findFormatSetup whichText global lastFindTerms if the optionKey is up then put true into goForward else put false into goForward put "stored in the format" into dialogPhrase put whichText into lastFindTerms findAGS dialogPhrase,"format field","file format pointer","File Format Index",goForward end findFormatSetup on findNameSetup whichText global lastFindTerms put "There aren't any graphics with the description" into noneFound put "with the description" into dialogPhrase put whichText into lastFindTerms lookFor dialogPhrase,"description field","string" end findNameSetup on lookFor dialogPhrase,whichFld,searchType global findParams,lastFindTerms set cursor to watch lock screen put allFoundPrefix() into allFound put noneFoundPrefix() into noneFound put dialogPhrase && quote & lastFindTerms & quote & "." into endPhrase put empty into firstCard put empty into currentCard repeat until the mouseClick if the mouse is up then find whole lastFindTerms in fld whichFld else exit repeat if the foundChunk is empty then --The text wasn't found in the specified field, so exit. unlock screen stopBtnStatus false dialogIt noneFound && endPhrase exit lookFor end if put word 2 of the foundLine into thisLine if searchType is "whole" then if lastFindTerms is not line thisLine of fld whichFld then --There was a find, but not an exact match, so look again. next repeat end if else if whichFld is "description field" AND thisLine <> 1 then next repeat end if -- If it got this far, then there was an exact match. if firstCard is empty then --This is the first time through. put the id of this cd into firstCard else put the id of this cd into currentCard stopBtnStatus true end if put "Click and Hold to stop." into bg fld "status" unlock screen with visual effect wipe left if searchType is "whole" then selectLine thisLine, last word of the foundLine else select the foundChunk if shallWeStop() then exit repeat if firstCard is currentCard then --You're at the same place you started, which means you've gone --through all of the cards, so stop. stopBtnStatus false if not the mouseClick then dialogIt allFound && endPhrase exit repeat end if lock screen put empty into bg fld "status" end repeat put the params into findParams stopBtnStatus false end lookFor --•• INDEX scripts --In the scripts that manipulate the indexes: --indexField is the field in this background that stores the text. --writeField is the name of the field on the card "Index storage" which --stores the needed index. --indexType is the class of keyword, e.g., keyword, book, --in singular form on buildIndex indexField,writeField,pointerField if not the lockMessages then answer "Build the" && writeField & "?" with "Cancel" or "OK" if it is "Cancel" then exit buildIndex end if lock screen put empty into thisIndex set lockMessages to true set lockRecent to true set cursor to watch push cd go cd 1 of this bg put "Building the" && writeField into status repeat with j = 1 to the number of cds in this bg showProgress status,round(j/(the number of cds in this bg)*100) repeat with i = 1 to (the number of lines in fld indexField) if line i of fld indexField is empty then next repeat if not isWithin(line i of fld indexField,thisIndex) then put line i of fld indexField & return after thisIndex end if end repeat go next cd of this bg end repeat writeIndex sortContainer(thisIndex), writeField buildPointers indexField,writeField,pointerField pop cd hideProgress end buildIndex on addToIndex indexType,writeField,pointerField toggleLockScreen ask "Enter the name of the new" && indexType & ":" if it is empty then exit addToIndex else put it into addThis set cursor to busy put readIndex(writeField) into thisIndex if isWithin(addThis,thisIndex) then dialogIt "The" && indexType && quote & addThis & quote && "already exists in the" && writeField & "." else put addThis into line (the number of lines in thisIndex + 1) of thisIndex put sortContainer(thisIndex) into thisIndex writeIndex thisIndex,writeField put getLine(addThis,readIndex(writeField)) into thisLine newPointer thisLine,pointerField end if end addToIndex on newPointer thisLine,pointerField repeat with N = 0 to 9 put return before line thisLine of cd fld (pointerField && N) of cd "Index storage" end repeat end newPointer on deleteFromIndex indexField,writeField,pointerField global ListSelectExit set cursor to watch put "Delete what from the" && writeField & ":" into text put readIndex(writeField) into theIndex get listDialog(theIndex,13,text,"Dis","Delete,Cancel",604) put it into theAnswer if ListSelectExit is "cancel" then exit deleteFromIndex lock screen repeat with i = (the number of lines in theAnswer) down to 1 --for each term to be deleted put true into allInstancesDeleted go cd 1 of bg "the collection" put empty into alreadySeen repeat --for each instance of that term to be deleted. set cursor to watch put line i of theAnswer into whichText find whole whichText in fld indexField if the foundChunk is empty then exit repeat if isWithin(the short name of this cd,alreadySeen) then --we've already been to this cd exit repeat end if setCdNo put the short name of this cd & return after alreadySeen put word 2 of the foundLine into thisLine if whichText is not line thisLine of fld indexField then --this line is only part of the phrase we're looking for so next repeat end if unlock screen selectLine thisLine,indexField if the optionKey is down then dialogIt "Delete" && quote & whichText & quote && "from the" && indexField && "of this card?","Stop,No,Delete" put the result into decision unlock screen if decision is "Stop" then exit deleteFromIndex if decision is "No" then put false into allInstancesDeleted if decision is not "Delete" then next repeat end if delete line thisLine of fld indexField lock screen end repeat if allInstancesDeleted then --delete the term from the index put getLine(whichText,theIndex) into thisLine if thisLine is not empty then delete line thisLine of theIndex writeIndex theIndex,writeField deletePointer thisLine,pointerField end if end repeat end deleteFromIndex on deletePointer thisLine,pointerField repeat with N = 0 to 9 delete line thisLine of cd fld (pointerField && N) of cd "Index storage" end repeat end deletePointer on writeIndex thisIndex,writeField put thisIndex into cd fld writeField of cd "Index storage" set the scroll of cd fld writeField of cd "Index storage" to 0 toggleLockScreen end writeIndex on exportIndex writeField,fileName open file fileName put readIndex(writeField) into keywordIndex write keywordIndex to file fileName close file fileName dialogIt "The file" && fileName && "was created." end exportIndex on assignToCard indexType,indexField,writeField,pointerField global ListSelectExit set cursor to watch put "Assign what" && indexType & "(s) to this card:" into text put readIndex(writeField) into theList put listDialog(theList,13,text,"Dis","Assign,New,Cancel",605) into assignThis if ListSelectExit is "cancel" then exit assignToCard else if ListSelectExit is "new" then addToIndex indexType,writeField,pointerField assignToCard indexType,indexField,writeField,pointerField exit assignToCard end if repeat with i = 1 to the number of lines in assignThis set cursor to busy if isWithin(line i of assignThis,fld indexField) then dialogIt "The" && indexType && quote & line i of assignThis & quote && "is already assigned to this graphic." else -- The term is not already assigned. put fld indexField into newContents put line i of assignThis into line (the number of lines in newContents + 1) of newContents put alphaSort(newContents) into fld indexField assignPointer line i of assignThis,writeField,pointerField end if end repeat end assignToCard on assignPointer whichText,writeField,pointerField put getValidFileNames(whichText,pointerField,writeField) into validFiles if bg fld "file name field" > last item of validFiles then put bg fld "file name field" into item (the number of items in validFiles + 1) of validFiles else put binaryInsert(bg fld "file name field",validFiles) into newItem put bg fld "file name field" & "," before item newItem of validFiles end if writePointer whichText,validFiles,writeField,pointerField end assignPointer on deleteFromCard indexType,indexField,writeField,pointerField global ListSelectExit set cursor to watch put "Delete what from the" && indexType & "s" && "field of this card?" into text put fld indexField into theList put listDialog(theList,13,text,"Dis","Delete,Cancel",602) into deleteThese if ListSelectExit is "cancel" then exit deleteFromCard repeat with N = (the number of lines in deleteThese) down to 1 set cursor to busy put line N of deleteThese into deleteThis deletePointerToCard deleteThis,writeField,pointerField put getLine(deleteThis,fld indexField) into thisLine if thisLine is not 0 then delete line thisLine of fld indexField end repeat set scroll of fld indexField to 0 end deleteFromCard on deletePointerToCard whichText,writeField,pointerField put getValidFileNames(whichText,pointerField,writeField) into validFiles put itemNumber(bg fld "file name field",validFiles) into thisItem delete item thisItem of validFiles writePointer whichText,validFiles,writeField,pointerField end deletePointerToCard on writePointer whichText,validFiles,writeField,pointerField put getLine(whichText,readIndex(writeField)) into pointerLine put nameOfPointerField(whichText,pointerField) into pointerFieldName put validFiles into line pointerLine of cd fld pointerFieldName of cd "Index storage" end writePointer --•• FUNCTIONS function formatDescription whichText if length of whichText < 31 then return whichText if length of whichText = 31 and last char of whichText = "…" then return whichText end if return char 1 to 30 of whichText & "…" & return & whichText end formatDescription function bgCard return (the number of this cd - bgStart()) + 1 end bgCard function bgStart return the number of cd 1 of this bg end bgStart function menuPop whichObject if whichObject is empty then put the target into whichObject set the hilite of whichObject to true put the bottom of whichObject into menuT put the left of whichObject + 1 into menuL return (menuT & ", " & menuL) end menuPop function formatDescription whichText if length of whichText < 31 then return whichText if length of whichText = 31 and last char of whichText = "…" then return whichText end if return char 1 to 30 of whichText & "…" & return & whichText end formatDescription function developerBtns return "menu blanket,catalog,indexes,management,card" end developerBtns function buildPicturePath --Remove this and calling handlers from the toolkit. put bg fld "file name field" into fileName put the long name of this stack into longName delete char 1 to 7 of longName delete last char of longName put getPath(longName) into longName put "other files:*graphic files:" after longName return longName & char 1 of fileName & "aaa-" & char 1 of fileName & "zzz:" & fileName end buildPicturePath function backgroundSort backgroundNumber if the number of this background < backgroundNumber then return "a" else if the number of this background > backgroundNumber then return "zzzzzzzzz" else return line 1 of background field "File name field" end if end backgroundSort function cardPictureExists --returns true if a card picture exists put the userLevel into userStatus if the userLevel < 3 then set the userLevel to 3 put the tool into toolStatus choose select tool doMenu "select" if the tool = "lasso tool" then --a card picture does exist put true into thisText else --no card picture exists put false into thisText end if choose toolStatus set the userLevel to userStatus return thisText end cardPictureExists function isEPN whichContainer if char 1 of whichContainer is in "0123456789" OR (char 1 to 2 of whichContainer = "pX") OR (char 1 to 2 of whichContainer = "pM") OR (char 1 to 3 of whichContainer = "k2s") OR (char 1 to 3 of whichContainer = "pGE") OR (char 1 to 3 of whichContainer = "kmb") OR (char 1 to 4 of whichContainer = "APDA") OR (char 1 to 5 of whichContainer = "m5116") then return true return false end isEPN function isFigNo whichContainer if char 1 to 3 of whichContainer = "fig" OR char 1 to 2 of whichContainer = "pg" OR char 1 to 3 of whichContainer = "pge" OR char 1 to 5 of whichContainer = "panel" then return true return false end isFigNo -- part 391 (button) -- low flags: 80 -- high flags: 0001 -- rect: left=8 top=8 right=27 bottom=506 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 200 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Menu blanket -- part 374 (button) -- low flags: 00 -- high flags: 0002 -- rect: left=240 top=50 right=307 bottom=505 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 156 -- text size: 13 -- style flags: 0 -- line height: 17 -- part name: Info Blanket -- part 371 (field) -- low flags: 81 -- high flags: 0007 -- rect: left=247 top=102 right=272 bottom=498 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 4 -- text size: 9 -- style flags: 0 -- line height: 12 -- part name: List ----- HyperTalk script ----- on mouseUp put clickLine(the name of me) into whichLine selectLine whichLine,the short name of me findEntry whichLine,line whichLine of me,the name of me end mouseUp -- part 216 (button) -- low flags: 00 -- high flags: A001 -- rect: left=42 top=314 right=334 bottom=139 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 200 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: 29 of 619 ----- HyperTalk script ----- on mouseUp send findCdNumber to bg btn "find…" end mouseUp -- part 12 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=21 top=313 right=335 bottom=39 -- title width / last selected line: 0 -- icon id / first selected line: 23716 / 23716 -- text alignment: 1 -- font id: 200 -- text size: 10 -- style flags: 0 -- line height: 13 -- part name: Prev ----- HyperTalk script ----- on mouseDown global ticksToWait if the commandKey is down then send setBrowseSpeed to bg btn "management" exit mouseDown end if set hilite of me to true go prev cd of this bg repeat while the mouse is down put (the ticks + ticksToWait) into stopTicks repeat until stopTicks < (the ticks) if the mouse is up then set hilite of me to false exit mouseDown end if end repeat go prev cd of this bg end repeat set hilite of me to false end mouseDown -- part 29 (field) -- low flags: 01 -- high flags: 0007 -- rect: left=244 top=123 right=204 bottom=501 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 200 -- text size: 10 -- style flags: 0 -- line height: 13 -- part name: Keywords field ----- HyperTalk script ----- on mouseUp if the optionKey is down and the shiftKey is down then delete line clickLine(the name of me) of me exit mouseUp end if put line clickLine(the name of me) of me into whichText if whichText is empty then exit mouseUp set cursor to watch findKWSetup whichText end mouseUp -- part 84 (button) -- low flags: 00 -- high flags: A000 -- rect: left=239 top=105 right=123 bottom=303 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 200 -- text size: 10 -- style flags: 0 -- line height: 13 -- part name: Keywords: ----- HyperTalk script ----- on mouseUp send findKW to bg btn "find…" end mouseUp -- part 85 (button) -- low flags: 00 -- high flags: A000 -- rect: left=239 top=84 right=99 bottom=302 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 200 -- text size: 10 -- style flags: 0 -- line height: 13 -- part name: File Name: ----- HyperTalk script ----- on mouseUp send findID to bg btn "find…" end mouseUp -- part 93 (button) -- low flags: 00 -- high flags: A000 -- rect: left=411 top=84 right=99 bottom=458 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 200 -- text size: 10 -- style flags: 0 -- line height: 13 -- part name: Format: ----- HyperTalk script ----- on mouseUp send findFormat to bg btn "find…" end mouseUp -- part 94 (field) -- low flags: 01 -- high flags: 0002 -- rect: left=457 top=84 right=99 bottom=501 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 200 -- text size: 10 -- style flags: 0 -- line height: 13 -- part name: format field ----- HyperTalk script ----- on mouseUp put line clickLine(the name of me) of me into whichText if whichText is empty then exit mouseUp set cursor to watch findFormatSetup whichText end mouseUp -- part 111 (button) -- low flags: 80 -- high flags: 8004 -- rect: left=368 top=8 right=27 bottom=505 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 200 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Card ----- HyperTalk script ----- on mouseDown global cardMenu get menuPop(the name of me) put item 1 of it into menuT put item 2 of it into menuL put BigPop(cardMenu,menuT,menuL) into theChoice if theChoice = 1 then displayTiny if theChoice = 2 then put formatDescription(fld "Description field") into fld "Description field" end if if theChoice = 4 then assignToCard "keyword","keywords field","Keyword Index","keyword pointer" end if if theChoice = 5 then deleteFromCard "Keyword","keywords field","Keyword Index","keyword pointer" end if if theChoice = 7 then assignBook set hilite of me to false end mouseDown on assignBook global ListSelectExit put "appears in books field" into whichFld set cursor to watch put "Assign what book to this card?" into text put readIndex("book index") into theList get listDialog(theList,13,text,"Dis","Assign,New^,Cancel",605) put it into theAnswer if ListSelectExit is "cancel" then exit assignBook else if ListSelectExit is "new" then send addToBookIndex to bg btn "indexes" assignBook end if if line 1 of theAnswer is not empty then put fld whichFld into fldConts if fldConts is empty then put line 1 of theAnswer into fldConts else repeat the number of lines in fldConts times if last line of fldConts is empty then delete last line of fldConts end repeat put line 1 of theAnswer into line (the number of lines in fldConts + 2) of fldConts end if if line 2 of theAnswer is not empty AND line 2 of theAnswer is not space then put return & line 2 of theAnswer after fldConts end if put fld "file name field" into fileName ask "Enter an archive number for" && quote & fileName & quote & "." if it is not empty then put return & it after fldConts put fldConts into fld whichFld end if end assignBook -- part 31 (field) -- low flags: 01 -- high flags: 0002 -- rect: left=308 top=84 right=99 bottom=398 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 200 -- text size: 10 -- style flags: 0 -- line height: 13 -- part name: File Name field ----- HyperTalk script ----- on mouseUp dialogIt "The file name uniquely identifies a graphic in the stack." && "Click the Find button to find a graphic with a specific file name." end mouseUp -- part 114 (button) -- low flags: 80 -- high flags: 8004 -- rect: left=224 top=8 right=27 bottom=367 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 200 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Management ----- HyperTalk script ----- on mouseDown global managementMenu get menuPop(the name of me) put item 1 of it into menuT put item 2 of it into menuL put BigPop(managementMenu,menuT,menuL) into theChoice if theChoice = 1 then combineStacks else if theChoice = 2 then createShell else if theChoice = 4 then setBrowseSpeed else if theChoice = 5 then sortCards else if theChoice = 6 then printCardsFromBook set the hilite of me to false end mouseDown on printCardsFromBook global ListSelectExit put readIndex("book index") into theList put "Print cards with graphics from what book?" into text get listDialog(theList,13,text,"Dis","OK,Cancel",604) toggleLockScreen if it is empty OR it is space OR ListSelectExit is "cancel" then exit printCardsFromBook put it into thisBook put getValidFileNames(thisBook,"book pointer","book index") into validFileNames put binaryInsert(bg fld "file name field",validFileNames) into thisItem -- thisItem is the item number in validFileNames of the NEXT valid -- file name in the stack. if thisItem = 0 then exit printCardsFromBook put advanceItem(thisItem,true,validFileNames) into thisItem lock screen open printing repeat with N = (the number of items in validFileNames) down to 1 put getCardId(item thisItem of validFileNames) into thisCardId if thisCardId is empty then exit repeat go cd id thisCardId if the result is not empty then next repeat put getLine(thisBook,fld "Appears in books field") into thisLine if thisLine is empty then next repeat -- There is an exact match. print this card updateStatus N stopBtnStatus true unlock screen with visual effect wipe left if N <> the number of items in validFileNames then -- This is not the first time through if shallWeStop() then exit repeat end if lock screen put empty into fld "Status" put advanceItem(thisItem,true,validFileNames) into thisItem if N = 1 then -- You've gone to all of the appropriate cards, so stop. wait 30 stopBtnStatus false unlock screen wait 40 end if end repeat close printing stopBtnStatus false put empty into bg fld "status" end printCardsFromBook on setBrowseSpeed global ticksToWait ask "Pause at each card for how many seconds?" with (ticksToWait/60) put it into numberEntered if numberEntered is empty then exit setBrowseSpeed if nonNegativeNumber(numberEntered) then put (numberEntered*60) into ticksToWait put ticksToWait into cd fld "browsing speed" of cd "Index storage" else dialogIt "Please enter a positive number." && quote & numberEntered & quote && "is not a positive number." end if end setBrowseSpeed on combineStacks -- Import thumbnails and text from a specific stack into this stack. put FileName("STAK","Import data from what stack?") into dataStack if dataStack is empty then exit combineStacks toggleLockScreen put "stack" && quote before dataStack put quote after dataStack set cursor to busy put the long name of this stack into shellStack set lockMessages to true set lockRecent to true set cursor to busy lock screen go dataStack go bg "The Collection" collectIDs put the result into dataStackIDs compareIDs dataStackIDs, shellStack put the result into dataStackIDs copyTextToStack dataStackIDs,shellStack,dataStack put the result into newGraphics set cursor to watch if newGraphics is not empty then showNew newGraphics, "Cards with these file names were added" && "to the stack." end if openBackground openCard choose browse tool send "buildAllIndexes" to bg btn "indexes" end combineStacks on copyTextToStack dataStackIDs,shellStack,dataStack put empty into newGraphics go shellStack go bg "The Collection" go last cd of this bg put the long name of this cd into shellCd put "Importing data" into status go dataStack put cd fld "paths to graphics" of cd "Index storage" into newPaths put readIndex("keyword index") into newKeywords go bg "the collection" put the long name of this cd into dataCd repeat with i = 1 to the number of lines in dataStackIDs showProgress status,round(i/(the number of lines in dataStackIDs)*100) set cursor to busy if not diskSpaceAvailable() then go shellCd put empty exit copyTextToStack end if go dataCd find whole (line i of dataStackIDs) in fld "file name field" put the long name of this cd into dataCd put fld "description field" into description put fld "keywords field" into keywords put fld "file name field" into graphicID put fld "format field" into graphicFormat put fld "appears in books field" into books if cardPictureExists() then copyThumbnail put true into pictOnClipboard else put false into pictOnClipboard go shellCd doMenu "new card" put the long name of this cd into shellCd setCdNo unlock screen put description into fld "description field" put keywords into fld "keywords field" put graphicID into fld "file name field" put fld "file name field" & return after newGraphics put graphicFormat into fld "format field" put books into fld "appears in books field" if pictOnClipboard then --a thumbnail needs to be pasted onto the card. type "V" with commandKey end if lock screen choose browse tool end repeat hideProgress checkDocuments newPaths put readIndex("keyword index") into oldKeywords repeat with N = 1 to the number of lines in newKeywords if not isWithin(line N of newKeywords,oldKeywords) then put line N of newKeywords into line (the number of lines in oldKeywords + 1) of oldKeywords end if end repeat writeIndex sortContainer(oldKeywords),"keyword index" go bg "The Collection" -- currently at the first cd if fld "file name field" is empty then doMenu "delete card" return newGraphics end copyTextToStack on collectIDs go first cd of this bg put "Collecting File Names" into status repeat with j = 1 to the number of cds in this bg showProgress status,round(j/(the number of cds in this bg)*100) set cursor to busy put fld "file name field" & return after listOfIDs go next cd of this bg end repeat hideProgress return listOfIDs end collectIDs on compareIDs dataStackIDs, shellStack go shellStack go bg "the collection" if the number of cds in this bg is 1 AND bg fld "file name field" is empty then return dataStackIDs put 1 into i put empty into alreadyExists put "Comparing File Names" into status repeat with j = 1 to the number of lines in dataStackIDs showProgress status,round(j/(the number of lines in dataStackIDs)*100) set cursor to busy find whole (line i of dataStackIDs) in fld "file name field" if the foundField = empty then --this file name needs to be added to the shell stack add 1 to i else --this file name already exists in the shell stack put line i of dataStackIDs & return after alreadyExists delete line i of dataStackIDs end if end repeat hideProgress if alreadyExists <> empty then showExisting alreadyExists return dataStackIDs end compareIDs on createShell global activeListName dialogIt "Delete all cards in this background except for one?","Cancel,OK" if the result = "Cancel" then exit createShell -- send mouseUp now so it isn't sent at the end of these handlers. mouseUp set cursor to watch toggleLockScreen lock screen set lockMessages to true set lockRecent to true go first cd of this bg choose select tool drag from 0,0 to 300,300 doMenu "Clear Picture" choose browse tool put empty into fld "description field" put empty into fld "file name field" put empty into fld "format field" put empty into fld "keywords field" put empty into fld "appears in books field" go next cd of this bg put the number of cds in this bg into N put (N - 1) into deleteThisMany if deleteThisMany > 0 then put "Deleting cards" into status repeat with i = 1 to deleteThisMany showProgress status,round(i/N*100) set cursor to busy if the short name of this bg = "The Collection" then doMenu "delete card" end if end repeat hideProgress end if go cd "Index storage" if the result is not empty then dialogIt "There isn't a card named Index storage, so the indexes" && "could not be deleted." exit createShell end if send openCard to cd "Index storage" repeat until the lockScreen is false unlock screen with barn door open end repeat answer "Delete indexes?" with "Cancel" or "OK" if it is "Cancel" then exit createShell repeat with i = 1 to the number of cd flds put empty into cd fld i end repeat put "Untitled" into activeListName doMenu "compact stack" end createShell -- part 163 (button) -- low flags: 00 -- high flags: A002 -- rect: left=128 top=32 right=55 bottom=229 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 200 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Open Graphic ----- HyperTalk script ----- on mouseUp displayPicture end mouseUp -- part 217 (button) -- low flags: 00 -- high flags: A000 -- rect: left=173 top=314 right=334 bottom=231 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 200 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Quit ----- HyperTalk script ----- on mouseUp doMenu "quit hypercard" end mouseUp -- part 274 (button) -- low flags: 80 -- high flags: 8004 -- rect: left=124 top=8 right=27 bottom=223 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 200 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Indexes ----- HyperTalk script ----- on mouseDown global indexesMenu get menuPop(the name of me) put item 1 of it into menuT put item 2 of it into menuL get BigPop(indexesMenu,menuT,menuL) indexesChoice it set the hilite of me to false end mouseDown -- AGS only on indexesChoice theChoice -- This is a separate handler so that other handlers can call -- this handler from other objects. if theChoice = 1 then buildAllIndexes if theChoice = 3 then buildIndex "keywords field","Keyword Index","keyword pointer" end if if theChoice = 4 then addToIndex "keyword","Keyword Index","keyword pointer" end if if theChoice = 5 then deleteFromIndex "Keywords field","Keyword Index","keyword pointer" end if if theChoice = 6 then exportIndex "Keyword Index","Graphics Keyword Index" end if if theChoice = 8 then buildBookIndex if theChoice = 9 then addToBookIndex if theChoice = 10 then deleteFromIndex "Appears in Books field", "Book Index" end if if theChoice = 11 then exportIndex "book index","Graphics Book Index" if theChoice = 13 then buildFileNameIndex "file name field","File Name Index" end if if theChoice = 14 then buildIndex "format field","File Format Index","file format pointer" end if end indexesChoice on buildAllIndexes answer "Build all of the indexes?" with "Cancel" or "OK" if it is "cancel" then exit buildAllIndexes set lockMessages to true sortCards indexesChoice 3 indexesChoice 8 indexesChoice 13 indexesChoice 14 answer "All of the indexes have been built." openCard end buildAllIndexes on buildFileNameIndex indexField,writeField if not the lockMessages then answer "Build the" && writeField && "?" with "Cancel" or "OK" if it is "Cancel" then exit buildFileNameIndex end if lock screen put empty into thisIndex put empty into cd fld "file name index" of cd "Index storage" set lockMessages to true set cursor to watch push cd go cd 1 of this bg put "Building the" && writeField into status repeat with N = 1 to the number of cds in this bg showProgress status,round(N/(the number of cds in this bg)*100) put bg fld "file name field" & "," & the short id of this cd & return after newEntries if the number of lines in newEntries > 50 then put (the number of lines in cd fld "file name index" of cd "Index storage") + 1 into thisLine put newEntries into line thisLine of cd fld "file name index" of cd "Index storage" put empty into newEntries end if go next cd of this bg end repeat if newEntries is not empty then appendFileNameIndex newEntries pop cd hideProgress end buildFileNameIndex on appendFileNameIndex newEntries put (the number of lines in cd fld "file name index" of cd "Index storage") + 1 into thisLine put newEntries into line thisLine of cd fld "file name index" of cd "Index storage" end appendFileNameIndex on addToBookIndex ask "Enter the name of the new book:" if it = empty then exit addToBookIndex put it into addThis put readIndex("book index") into bookIndex if isWithin(addThis,bookIndex) then dialogIt "The book" && quote & addThis & quote && "already exists in the Book Index." exit addToBookIndex end if ask "What is the Eng. part number?" if it is empty then put empty into engPartNo else put return & it into engPartNo put return & addThis & engPartNo after bookIndex writeIndex bookIndex, "book index" deleteDeadLines sortBookIndex formatBookIndex end addToBookIndex on buildBookIndex if not the lockMessages then answer "Build the Book Index?" with "Cancel" or "OK" if it is "Cancel" then exit buildBookIndex end if collectBooks get cd fld "book index" of cd "Index storage" if it is empty then exit buildBookIndex sortBookIndex formatBookIndex EXIT TO HYPERCARD -- DEBUG buildPointers "appears in books field","book index","book pointer" end buildBookIndex on collectBooks lock screen set lockMessages to true set lockRecent to true set cursor to busy push cd go cd 1 of this bg put empty into bookIndex put "Collecting book names" into status repeat with j = 1 to the number of cds in this bg showProgress status,round(j/(the number of cds in this bg)*100) repeat with i = 1 to (the number of lines in fld "Appears in books field") set cursor to busy put line i of fld "Appears in books field" into valueOfThisLine if valueOfThisLine is empty OR isFigNo(valueOfThisLine) OR isWithin(valueOfThisLine,bookIndex) OR bookIndex contains "^" & valueOfThisLine OR bookIndex contains valueOfThisLine & "^" then -- This term exists in the book index next repeat end if -- This is a new book or Engineering part number. put line (i-1) of fld "Appears in books field" into valueOfPrevLine if valueOfPrevLine is empty then -- The previous line is empty, this new item is a book. put valueOfThisLine & return after bookIndex else -- This is a new Engineering part number. put addNewEPN(valueOfThisLine,valueOfPrevLine,bookIndex) into bookIndex end if end repeat go next cd of this bg end repeat hideProgress writeIndex bookIndex,"book index" end collectBooks on sortBookIndex put readIndex("book index") into bookIndex put sortContainer(bookIndex) into bookIndex put substitute("^", return,bookIndex) into bookIndex writeIndex bookIndex, "book index" end sortBookIndex on formatBookIndex put readIndex("book index") into bookIndex if bookIndex is empty then exit formatBookIndex set cursor to busy put 1 into i put "Formatting Book Index (deleting extra lines)" into status repeat (the number of lines in bookIndex) times showProgress status,round(i/(the number of lines in bookIndex)*100) set cursor to busy if line i of bookIndex is empty then delete line i of bookIndex else add 1 to i end repeat hideProgress put 1 into i put "Formatting Book Index (eng. part nos.)" into status repeat (the number of lines in bookIndex*2) times showProgress status,round(i/(the number of lines in bookIndex)*100) -- If this line is an engineering part no. AND the next line -- is NOT an EPN, then put a blank line after this line. set cursor to busy if isEPN(line i of bookIndex) AND not isEPN(line i + 1 of bookIndex) AND line (i+1) of bookIndex is not empty then put return & " " after line i of bookIndex -- Put this space into the line because the XCMD I use to -- display lists doesn't show empty lines. end if add 1 to i if i = (the number of lines in bookIndex) then exit repeat end repeat hideProgress put 2 into i put "Formatting Book Index (books)" into status repeat (the number of lines in bookIndex*2) times showProgress status,round(i/(the number of lines in bookIndex)*100) --if this line is a book and it doesn't have an engineering part no --then put a blank line after this line set cursor to busy if isEPN(line i of bookIndex) = false AND line i of bookIndex <> " " then if isEPN(line i-1 of bookIndex) = false AND line (i-1) of bookIndex <> " " then put " " & return before line i of bookIndex end if end if if i = (the number of lines in bookIndex) then exit repeat add 1 to i end repeat hideProgress if the number of lines in bookIndex > 0 then repeat until last line of bookIndex <> empty delete last line of bookIndex end repeat end if writeIndex bookIndex, "book index" end formatBookIndex on deleteDeadLines put readIndex("book index") into bookIndex put 1 into i put "Formatting Book Index (extra lines)" into status repeat (the number of lines in bookIndex) times showProgress status,round(i/(the number of lines in bookIndex)*100) if line i of bookIndex = empty OR line i of bookIndex = space then delete line i of bookIndex else add 1 to i end repeat hideProgress writeIndex bookIndex, "book index" end deleteDeadLines --• FUNCTIONS function addNewEPN newEPN,thisBook,bookIndex -- newEPN is the Engineering part number (EPN) that needs to be added. -- thisBook is the book this EPN refers to. -- bookIndex is the book index. put offset(thisBook,bookIndex) into numberOfChars put the number of lines in char 1 to numberOfChars of bookIndex into thisLine if thisLine is empty then -- The book does not exist in the book index (this should never happen). return bookIndex end if put "^" & newEPN after line thisLine of bookIndex return bookIndex end addNewEPN -- part 282 (field) -- low flags: 80 -- high flags: 2002 -- rect: left=15 top=84 right=267 bottom=226 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 200 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Banner -- part 289 (button) -- low flags: 00 -- high flags: A000 -- rect: left=239 top=205 right=222 bottom=333 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 200 -- text size: 10 -- style flags: 0 -- line height: 13 -- part name: Appears in books: ----- HyperTalk script ----- on mouseUp send findBook to bg btn "find…" end mouseUp -- part 290 (field) -- low flags: 01 -- high flags: 0007 -- rect: left=244 top=222 right=303 bottom=501 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 200 -- text size: 10 -- style flags: 0 -- line height: 13 -- part name: appears in books field ----- HyperTalk script ----- on mouseUp put line clickLine(the name of me) of me into whichText if whichText is empty then exit mouseUp set cursor to watch if isFigNo(whichText) then selectLine clickLine(the name of me), the short name of me answer "You can't search by the archive number." select empty else findBookSetup whichText end mouseUp -- part 298 (field) -- low flags: 01 -- high flags: 0002 -- rect: left=308 top=62 right=77 bottom=501 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 200 -- text size: 10 -- style flags: 0 -- line height: 13 -- part name: description field ----- HyperTalk script ----- on mouseUp if the shiftKey is down then setMe else put line clickLine(the name of me) of me into whichText if whichText is empty then exit mouseUp set cursor to watch findNameSetup whichText end if end mouseUp on setMe lock screen if the style of me is "scrolling" then setSize (top of me + textHeight of me + 2) set the style of me to rectangle else setSize (the bottom of fld "appears in books field") set the style of me to scrolling end if end setMe on setSize whichSize get the rect of me put whichSize into item 4 of it set the rect of me to it end setSize -- part 299 (button) -- low flags: 00 -- high flags: A000 -- rect: left=9 top=283 right=305 bottom=63 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 200 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Find ----- HyperTalk script ----- on mouseUp global ListSelectExit put "Find graphics by:" into text put "Description" & return & "File Name" & return & "File Format" & return & "Keyword" & return & "Book" & return & "Card number" into theList get listDialog(theList,13,text,"one","OK,Cancel",602) toggleLockScreen put it into theAnswer if ListSelectExit is "cancel" then exit mouseUp else if theAnswer is "description" then findName else if theAnswer is "file name" then findID else if theAnswer is "file format" then findFormat else if theAnswer is "keyword" then findKW else if theAnswer is "book" then findBook else if theAnswer is "card number" then findCdNumber end mouseUp on findKW global ListSelectExit,currentSection put readIndex("keyword index",currentSection) into theList put "Find graphics with what keyword?" into text get listDialog(theList,13,text,"Dis","OK,Cancel",602) toggleLockScreen if ListSelectExit is not "cancel" then findKWSetup it end findKW on findBook global ListSelectExit put readIndex("book index") into theList put "Find graphics from what book?" into text get listDialog(theList,13,text,"Dis","OK,Cancel",604) toggleLockScreen if it is not empty AND it is not space AND ListSelectExit is not "cancel" then findBookSetup it end findBook on findName global enterName ask "Find graphics with what description?" with enterName if it is not empty then toggleLockScreen put it into enterName findNameSetup enterName end if end findName on findFormat global enterFormat, ListSelectExit put readIndex("file format index") into theList put "Find graphics with what file format?" into text get listDialog(theList,13,text,"Dis","OK,Cancel",602) toggleLockScreen if ListSelectExit is not "cancel" then findFormatSetup it end findFormat on findID global idEntered ask "Find graphic with what file name:" with idEntered toggleLockScreen if it is empty then exit findID put it into idEntered set cursor to busy lock screen set lockMessages to true set lockRecent to true find idEntered in fld "file name field" if the foundChunk is empty then dialogIt "The file name "& quote & idEntered & quote && "is not assigned to any graphic." else openCard unlock screen with visual effect wipe left select line 1 of bg fld "file name field" wait 30 select empty end if end findID on findCdNumber global cdNo toggleLockScreen ask "Find graphic with the card number:" with cdNo if it is empty then exit findCdNumber put it into cdNo go cd cdNo of this bg if the result is empty then unlock screen with visual effect wipe left else dialogIt quote & cdNo & quote && "is not a valid card number." end if end findCdNumber -- part 320 (button) -- low flags: 80 -- high flags: C002 -- rect: left=15 top=62 right=84 bottom=226 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 200 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Help Section -- part 319 (button) -- low flags: 80 -- high flags: 0001 -- rect: left=19 top=65 right=81 bottom=37 -- title width / last selected line: 0 -- icon id / first selected line: 3071 / 3071 -- text alignment: 1 -- font id: 200 -- text size: 14 -- style flags: 0 -- line height: 18 -- part name: help close ----- HyperTalk script ----- on mouseUp send cleanExit to bg btn "Help" end mouseUp on mouseDown set the icon of me to 3358 end mouseDown on mouseLeave set the icon of me to 3071 end mouseLeave -- part 321 (button) -- low flags: 80 -- high flags: A002 -- rect: left=240 top=282 right=306 bottom=302 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 200 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: New List ----- HyperTalk script ----- on mouseUp global changesToList, activeListName, taggedList put the long name of this cd into returnHere saveChanges true,taggedList,true set cursor to busy push cd lock screen goListStack "untitled" --Just to make sure that the list stack is there and it is unlocked. --If it's not, the user should know about it at this point, while --trying to create a new list. if the result = "no" then pop cd exit to hypercard end if go returnHere openCard put 0 into listScroll set the scroll of fld "list" to listScroll put false into changesToList put "Untitled" into activeListName showListName put empty into taggedList put taggedList into fld "list" end mouseUp -- part 322 (button) -- low flags: 80 -- high flags: A002 -- rect: left=301 top=282 right=306 bottom=377 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 200 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Open List ----- HyperTalk script ----- on mouseUp global changesToList, taggedList, activeListName, listScroll put long name of this cd into returnHere if changesToList then saveChanges true,taggedList,true set cursor to busy openAList returnHere put the result into selectedList if selectedList is empty then go returnHere openCard exit mouseUp end if set cursor to busy put selectedList into activeListName goListStack activeListName if the result = "no" then exit mouseUp put fld "tagged list" into taggedList go returnHere put taggedList into fld "list" put 0 into listScroll set scroll of fld "list" to listScroll showListName put false into changesToList openCard end mouseUp on openAList returnHere global activeListName, ListSelectExit -- build a list of the lists goListStack if the result = "no" then exit openAList go bg "lists" put empty into listNames repeat (the number of cds in this bg) times set cursor to busy if the short name of this cd <> "untitled" then put the short name of this cd & return after listNames end if go next cd of this bg end repeat put sortContainer(listNames) into theList put "Select a list to open:" into text go returnHere put listDialog(theList,13,text,"one","OK,Cancel",602) into theChoice if ListSelectExit = "cancel" then return empty else return theChoice end openAList -- part 323 (button) -- low flags: 80 -- high flags: A002 -- rect: left=420 top=282 right=306 bottom=505 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 200 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Delete List ----- HyperTalk script ----- on mouseUp put the long name of this cd into returnHere put listsToDelete(returnHere) into deleteLists if deleteLists = empty then go returnHere openCard exit mouseUp end if goListStack (line 1 of deleteLists) if the result = "no" then go returnHere openCard exit mouseUp end if -- You're in the list stack. repeat with i = 1 to the number of lines in deleteLists if the optionKey is up then dialogIt "Delete list "& quote & line i of deleteLists & quote & "?", "Cancel,OK" if the result is "cancel" then exit mouseUp end if go cd (line i of deleteLists) if the result <> empty then dialogIt "The list" && the short name of this cd && "was not found." next repeat end if doMenu "delete card" end repeat go returnHere openCard end mouseUp function listsToDelete returnHere global activeListName, ListSelectExit -- build a list of the lists goListStack "untitled" if the result = "no" then return empty if the number of cds in this bg = 1 then answer "You can't delete the only list." exit listsToDelete end if put empty into listNames repeat (the number of cds in this bg) times if the short name of this cd is not activeListName AND the short name of this cd is not "untitled" then put the short name of this cd & return after listNames end if go next cd of this bg end repeat put sortContainer(listNames) into theList put "Select the list to delete:" into text go returnHere put listDialog(theList,13,text,"Dis","Delete,Cancel",602) into theChoice if ListSelectExit is "cancel" then return empty else return theChoice end listsToDelete -- part 324 (button) -- low flags: 80 -- high flags: A002 -- rect: left=431 top=312 right=336 bottom=505 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 200 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Print List ----- HyperTalk script ----- on mouseUp global listScroll, activeListName put empty into savedUserLevel if the userLevel < 4 then put the userLevel into savedUserLevel set the userLevel to 4 end if put the long name of this cd into returnHere put "Print the list" && quote & activeListName & quote && "with or without thumbnails?" into dialogText dialogIt dialogText,"Cancel,Without,With" put the result into it if it = "Cancel" then exit mouseUp if it = "With" then printWithThumbnails returnHere else printNoThumbnails returnHere go returnHere set the scroll of fld "list" to listScroll if savedUserLevel <> empty then set the userLevel to savedUserLevel openCard end mouseUp on printWithThumbnails returnHere global activeListName, taggedList, entryPrefix set cursor to busy goListStack "print TN/odd" if the result = "no" then go returnHere exit to hypercard end if put "LIST NAME:" into cd fld "title to print" put activeListName after cd fld "title to print" put taggedList into pTaggedList put "top" into reference put 1 into i open printing repeat (the number of lines in pTaggedList/2) times if reference = "top" then go cd "print TN/odd" put "bottom" into reference else go cd "print TN/even" put "top" into reference end if set cursor to busy put line i of pTaggedList into line 1 of cd fld "list" put line (i+1) of pTaggedList into line 2 of cd fld "list" put line (i+1) of pTaggedList into fileName delete char 1 to (the length of entryPrefix) of fileName push cd go returnHere find fileName in fld "file name field" if the foundChunk <> empty AND cardPictureExists() then copyThumbnail put true into pictureOnClipboard else put false into pictureOnClipboard pop cd if pictureOnClipboard then type "V" with commandKey drag from 118,107 to 123,170 choose browse tool end if print this cd removeCdPict add 2 to i end repeat close printing end printWithThumbnails on printNoThumbnails global activeListName, taggedList lock screen set lockMessages to true set cursor to busy put taggedList into pTaggedList push cd goListStack "print w/out TN top" if the result = "no" then pop cd exit to hypercard end if put "LIST NAME:" into cd fld "title to print" put activeListName after cd fld "title to print" put linesVisible(the name of cd fld "list") into linesShowing put the number of lines in pTaggedList into numberOfLines put (the textHeight of cd fld "list") into pTextHeight put numberOfLines/pTextHeight into thisMany put trunc(thisMany) into thisMany put numberOfLines mod pTextHeight into remainder put abs(remainder) into remainder if remainder > 0 then add 1 to thisMany put "top" into reference open printing repeat thisMany times if reference = "top" then go cd "print w/out TN top" put "bottom" into reference else go cd "print w/out TN bottom" put "top" into reference end if set cursor to busy put pTaggedList into cd fld "list" set scroll of cd fld "list" to 0 print this cd repeat with i = 1 to linesShowing delete line 1 of pTaggedList end repeat end repeat close printing end printNoThumbnails -- part 325 (button) -- low flags: 80 -- high flags: A002 -- rect: left=376 top=282 right=306 bottom=421 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 200 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Save ----- HyperTalk script ----- on mouseUp global changesToList,listScroll,taggedList set cursor to busy put the scroll of fld "list" into listScroll put the long name of this cd into returnHere --changesToList = true if changes have been made to the list if changesToList then saveChanges false,taggedList,true go returnHere set the scroll of fld "list" to listScroll openCard end mouseUp -- part 10 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=142 top=313 right=335 bottom=160 -- title width / last selected line: 0 -- icon id / first selected line: 28600 / 28600 -- text alignment: 1 -- font id: 200 -- text size: 10 -- style flags: 0 -- line height: 13 -- part name: Next ----- HyperTalk script ----- on mouseDown global ticksToWait if the commandKey is down then send setBrowseSpeed to bg btn "management" exit mouseDown end if set hilite of me to true go next cd of this bg repeat while the mouse is down put (the ticks + ticksToWait) into stopTicks repeat until stopTicks < (the ticks) if the mouse is up then set hilite of me to false exit mouseDown end if end repeat go next cd of this bg end repeat set hilite of me to false end mouseDown -- part 353 (button) -- low flags: 80 -- high flags: A002 -- rect: left=247 top=57 right=77 bottom=498 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: List Name: Untitled ----- HyperTalk script ----- on mouseUp global activeListName,taggedList,changesToList put the long name of this cd into returnHere set cursor to busy checkListName "Save the open list as:", activeListName if the result <> empty then go returnHere openCard exit mouseUp end if --The list name given is valid and is in the global activeListName. --You are in the list stack. put taggedList into fld "tagged list" put false into changesToList go returnHere showListName openCard end mouseUp -- part 312 (button) -- low flags: 80 -- high flags: 8002 -- rect: left=240 top=312 right=336 bottom=350 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 200 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Add This Graphic ----- HyperTalk script ----- on mouseUp global taggedList,entryPrefix,changesToList,entrySuffix set cursor to busy --Do this hiliting manually, since the user may have hit control-A --to activate this button --(See the background script handler "controlKey"). set hilite of me to true set hilite of me to false -- put true into changesToList put (the number of lines in taggedList + 1) into lastLine put (lastLine / 2 + .5) into entryNo if entryNo >= 500 then dialogIt "Each list is limited to 500 entries." && "This graphic was not added to your list." exit mouseUp end if put beginEntryLine(entryNo) into beginLine lock screen put beginLine & entryNo & entrySuffix into newEntry if line 1 of fld "description field" is empty then put "none" after newEntry else put line 1 of fld "description field" after newEntry end if put return & entryPrefix & fld "file name field" after newEntry put newEntry into line lastLine of taggedList if the visible of bg fld "list" then put newEntry into line lastLine of fld "list" setScroll (lastLine+1) end if end mouseUp on setScroll lastLine if lastLine > linesVisible(the name of fld "list") then repeat 2 times set scroll of fld "list" to (the scroll of fld "list" + the textHeight of fld "list") end repeat end if end setScroll -- part 313 (button) -- low flags: 80 -- high flags: A002 -- rect: left=349 top=312 right=336 bottom=432 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 200 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Delete # ----- HyperTalk script ----- on mouseUp global taggedList,changesToList deleteListEntries (the name of bg fld "list") if fld "list" is not taggedList then --a change was made put fld "list" into taggedList put true into changesToList end if end mouseUp -- part 385 (button) -- low flags: 00 -- high flags: A000 -- rect: left=239 top=62 right=77 bottom=309 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 200 -- text size: 10 -- style flags: 0 -- line height: 13 -- part name: Description: ----- HyperTalk script ----- on mouseUp send findName to bg btn "find…" end mouseUp -- part 398 (button) -- low flags: 80 -- high flags: 8004 -- rect: left=8 top=8 right=27 bottom=123 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 200 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Catalog ----- HyperTalk script ----- --• SYSTEM MESSAGES on mouseDown global catalogMenu get menuPop(the name of me) put item 1 of it into menuT put item 2 of it into menuL put BigPop(catalogMenu,menuT,menuL) into theChoice if theChoice = 1 then catalogFolder else if theChoice = 2 then catalogOneFile set the hilite of me to false end mouseDown --• MESSAGE HANDLERS --• These handlers determine which directory or file need to be --• catalogued. on catalogFolder put folderName("Select a folder to catalog:") into thisFolder if thisFolder is empty then exit catalogFolder toggleLockScreen catalogValidFiles thisFolder end catalogFolder on catalogOneFile put getFileName("Catalog which file?") into fileInfo if fileInfo is empty then exit catalogOneFile toggleLockScreen put the number of items in fileInfo into numberOfItems put item numberOfItems of fileInfo into fileType put item 1 to (numberOfItems - 1) of fileInfo into longName push cd importGraphic longName,fileType if the result then -- This is a new file. put getShortName(longName) into fileName assignText fileName else -- The file already exists. pop card dialogIt "A card that references the file “" & getShortName(longName) & "” already exists." end if end catalogOneFile --• These handlers catalog the files. on catalogValidFiles thisDirectory -- Fill in some variables. put the name of this cd into returnHere put getValidFiles(thisDirectory) into validFiles -- Check for errors in the result. if validFiles is empty then exit catalogValidFiles if item 1 of line 1 of validFiles contains "there was an error" then dialogIt "There was an error reading the data." exit catalogValidFiles end if -- Everything appears to be OK, so catalog the valid files. put empty into alreadyExists put empty into newGraphics put "Cataloguing the new files" into status put the number of lines in validFiles into thisManyLines -- Check out each of the files. repeat with N = 1 to thisManyLines showProgress status,round(N/(thisManyLines)*100) if not diskSpaceAvailable() then put empty exit catalogValidFiles end if put line 1 of validFiles into thisFile -- Parse out the file type and file name. put (the number of items in thisFile - 2) into typeItem put item typeItem of thisFile into fileType repeat 3 times delete last item of thisFile end repeat -- Make sure there is enough RAM to continue. if NOT memoryAvailable(75) then doMenu "quit hypercard" importGraphic thisFile,fileType -- Remember the files for the wrap-up dialogs. if the result then put getShortName(thisFile) & return after newGraphics else put getShortName(thisFile) & return after alreadyExists delete line 1 of validFiles end repeat hideProgress -- All of the valid files have been catalogued. checkDocuments if alreadyExists is NOT empty then showExisting alreadyExists if newGraphics is empty then go returnHere sayNoNewGraphics else showNew newGraphics,"Cards were created for these file names." assignText newGraphics end if end catalogValidFiles --• These handlers do the work of putting pictures and text --• onto the card. on importGraphic longName,fileType -- Catalogs the given file into the stack. -- Return true if the given graphic is not already catalogued, else -- return false. set cursor to watch lock screen put getShortName(longName) into fileName if fileAlreadyCatalogued(fileName,fileType) then return false -- This is a new graphic. Check to see if a new card is needed. if bgCard() is NOT 1 OR bg fld "file name field" is NOT empty then go last cd of this bg doMenu "new card" end if writeToCard longName,fileType,fileName,newGraphics return true end importGraphic function fileAlreadyCatalogued fileName,fileType -- Returns true if the given information is already catalogued. -- Else, returns false. put empty into firstCard put empty into currentCard go cd 1 of bg "the collection" put false into theAnswer repeat find whole fileName in fld "file name field" if the foundChunk is empty then -- The text was not found. exit repeat end if if the short name of this bg is "the collection" then if fileName is fld "file name field" AND fileType is fld "format field" then -- This is info is already catalogued. put true into theAnswer exit repeat end if end if -- The file name was found, but it was not an exact match. if firstCard is empty then -- This is the first time through. put the id of this cd into firstCard else put the id of this cd into currentCard if firstCard = currentCard then -- You've seen all of the appropriate cards. exit repeat end if end repeat if the short name of this bg is NOT "the collection" then go bg "the collection" end if return theAnswer end fileAlreadyCatalogued on writeToCard longName,fileType,fileName,newGraphics -- Write the given info to the card, including the file name, type, -- path, thumbnail. setCdNo put fileName into fld "file name field" put fileType into fld "format field" set cursor to watch displayTiny longName if the result is not empty then -- There was an error. doMenu "delete card" exit writeToCard end if repeat until not the lockScreen --repeat until the screen is unlocked unlock screen with visual effect wipe left end repeat put fileName & return after newGraphics put getPath(longName) into pathName put cd fld "paths to graphics" of cd "Index storage" into existPaths if not isWithin(pathName,existPaths) then put pathName into line (the number of lines in existPaths + 1) of existPaths put existPaths into cd fld "paths to graphics" of cd "Index storage" end if end writeToCard on assignText newGraphics set cursor to watch toggleLockScreen put empty into prevName put 1 into counter repeat until not the lockScreen --repeat until the screen is unlocked unlock screen end repeat repeat the number of lines in newGraphics times put line 1 of newGraphics into thisGraphic -- Go to the card that references this file. find whole thisGraphic in fld "file name field" visual effect wipe left setCdNo if shallWeContinue(counter,newGraphics) is "No" then exit repeat toggleLockScreen --Assign text to this card. assignDescription assignToCard "keyword","keywords field","Keyword Index" send assignBook to bg btn "Card" delete line 1 of newGraphics add 1 to counter end repeat openCard end assignText on assignDescription global prevName put fld "file name field" into fileName toggleLockScreen ask "Enter a description for" && quote & fileName & quote & "." with prevName if it is empty then exit assignDescription else put it into prevName toggleLockScreen put char 1 to 30 of prevName into fld "description field" if the length of prevName > 30 then put "…" after fld "description field" put prevName into line 2 of fld "description field" end if end assignDescription --• These handler put up dialog boxes to tell you what's going on. on sayNoNewGraphics toggleLockScreen dialogIt "There were no new file names." toggleLockScreen end sayNoNewGraphics on sayDuplicateExists toggleLockScreen put getShortName(longName) into fileName dialogIt "A file with the name “" & fileName & "” is already catalogued.","OK" toggleLockScreen end sayDuplicateExists --• FUNCTIONS function getValidFiles thisDirectory --• Search the given directory for valid files. set cursor to watch put OurFileInfo(thisDirectory,1) into validFiles if validFiles is empty then dialogIt "No valid graphic files were found in the directory" & return & "“" & thisDirectory & "”." return empty end if return validFiles end getValidFiles function shallWeContinue counter,newGraphics toggleLockScreen put bg fld "file name field" into fileName put the number of lines in newGraphics into N -- Fill in the first phrase if counter = 1 then --This is the first time through, so begin the dialog box with this. put N & space into firstPhrase if N = 1 then put "card was" after firstPhrase else put "cards were" after firstPhrase put space & "added to the stack." after firstPhrase else -- Let the person know how many cards are left. if N = 1 then put "There is 1 new card left." into firstPhrase else put "There are" && N && "new cards left." into firstPhrase end if -- Fill in second phrase put "The current card references the file" && quote & fileName & quote & "." into secondPhrase -- Fill in third phrase put "Do you want to" into thirdPhrase if N = 1 then put space & "enter information for this new card?" after thirdPhrase else put space & "continue entering information for these new cards?" after thirdPhrase end if dialogIt firstPhrase & space & secondPhrase & space & thirdPhrase, "No,Yes" return the result end shallWeContinue function memoryAvailable lowerLimit -- This handler checks available RAM (the heapspace) against the -- given lowerLimit. If the available memory is less than lowerLimit -- return false. Else, return true. if (the heapSpace / 1024) < lowerLimit then dialogIt "You have only" && the heapspace / 1024 && "RAM available. You should quit HyperCard to avoid losing" && "data.","Continue,Quit" if the result is "quit" then return false end if return true end memoryAvailable -- part 405 (button) -- low flags: 00 -- high flags: 8000 -- rect: left=240 top=28 right=50 bottom=407 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 200 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: About This Graphic ----- HyperTalk script ----- on mouseUp send mouseUp to bg btn "graphics view" end mouseUp -- part 406 (button) -- low flags: 00 -- high flags: A000 -- rect: left=64 top=283 right=305 bottom=135 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 200 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Find Again ----- HyperTalk script ----- on mouseUp global findParams if findParams is empty then answer "Find something first." else do findParams end mouseUp -- part 416 (button) -- low flags: 00 -- high flags: 8000 -- rect: left=408 top=28 right=50 bottom=504 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 200 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: AGS Lists ----- HyperTalk script ----- on mouseUp send mouseUp to bg btn "lists view" end mouseUp -- part 417 (field) -- low flags: 81 -- high flags: 2004 -- rect: left=254 top=288 right=331 bottom=489 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 200 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Delete msg -- part 387 (button) -- low flags: 80 -- high flags: 8002 -- rect: left=430 top=310 right=324 bottom=479 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 200 -- text size: 10 -- style flags: 0 -- line height: 13 -- part name: Done ----- HyperTalk script ----- on mouseUp deleteEntryVisible false end mouseUp -- part 421 (button) -- low flags: 00 -- high flags: 4006 -- rect: left=241 top=29 right=49 bottom=407 -- title width / last selected line: 0 -- icon id / first selected line: 17764 / 17764 -- text alignment: 1 -- font id: 200 -- text size: 14 -- style flags: 0 -- line height: 18 -- part name: Graphics View ----- HyperTalk script ----- on mouseUp changeView "graphics view" end mouseUp -- part 420 (button) -- low flags: 00 -- high flags: 0006 -- rect: left=408 top=28 right=49 bottom=504 -- title width / last selected line: 0 -- icon id / first selected line: 17764 / 17764 -- text alignment: 1 -- font id: 200 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Lists View ----- HyperTalk script ----- on mouseUp changeView "lists view" end mouseUp -- part 403 (field) -- low flags: 81 -- high flags: 2004 -- rect: left=91 top=30 right=56 bottom=422 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: status ----- HyperTalk script ----- --This object AGS only. on mouseUp hide me end mouseUp -- part 451 (button) -- low flags: 00 -- high flags: C000 -- rect: left=242 top=314 right=334 bottom=325 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 200 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Hardware ----- HyperTalk script ----- on mouseUp goStack (the short name of me) end mouseUp -- part 452 (button) -- low flags: 00 -- high flags: 8000 -- rect: left=328 top=314 right=334 bottom=415 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 200 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Networks ----- HyperTalk script ----- on mouseUp goStack (the short name of me) end mouseUp -- part 453 (button) -- low flags: 00 -- high flags: 8000 -- rect: left=418 top=314 right=334 bottom=502 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 200 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Technical ----- HyperTalk script ----- on mouseUp goStack (the short name of me) end mouseUp -- part 454 (button) -- low flags: 00 -- high flags: A000 -- rect: left=136 top=283 right=305 bottom=192 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 200 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Go Back ----- HyperTalk script ----- on mouseUp go back end mouseUp -- part 455 (button) -- low flags: 00 -- high flags: 8000 -- rect: left=193 top=283 right=305 bottom=232 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 200 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Help ----- HyperTalk script ----- --PASTE THE HELP FUNCTIONS OVER THE EXISTING FUNCTIONS IN THIS SCRIPT on mouseUp global cardMenu, catalogMenu, managementMenu, indexesMenu set hilite of me to true showHelp (not the visible of fld "banner") displayHelp "Banner" set cursor to 16 repeat --if they have one of these keys down, it may indicate they --are a bit confused or just want to move on, so exit. if the commandKey is down then cleanExit exit repeat end if if the optionKey is down then cleanExit exit mouseUp end if if the mouse is down then --the user clicked somewhere put the mouseLoc into userLoc if item 1 of userLoc < 0 OR item 1 of userLoc > 512 OR item 2 of userLoc < -15 OR item 2 of userLoc > 345 then --you clicked outside of the card cleanExit exit mouseUp end if --menus if userLoc is within the rect of bg btn "Card" then menuHelp cardMenu, "Card" end if if userLoc is within the rect of bg btn "catalog" then menuHelp catalogMenu, "catalog" end if if userLoc is within the rect of bg btn "Management" then menuHelp ManagementMenu, "Management" end if if userLoc is within the rect of bg btn "Indexes" then menuHelp indexesMenu, "Indexes" end if --btns whose names may change or have names that HyperTalk --doesn't like if userLoc is within the rect of bg btn id 216 then displayHelp "Card Number Btn" end if if userLoc is within the rect of bg btn id 353 then displayHelpByID "list Name","353" end if if userLoc is within the rect of bg btn id 313 then displayHelpBtn "Delete #…" end if --help objects if userLoc is within the rect of fld "banner" then displayHelpFld "banner" end if if userLoc is within the rect of bg btn "Help Close" OR userLoc is within the rect of bg btn "help" then cleanExit exit mouseUp end if if userLoc is within the rect of bg btn "Help Section" then displayHelp "banner" end if if the mouseLoc is within the rect of bg btn "Help Close" OR the mouseLoc is within the rect of bg btn "Help" then set cursor to arrow end if --other btns repeat with i = 1 to the number of bg btns if userLoc is within the rect of bg btn i then --check for all of the exceptions put id of bg btn i into thisID put the short name of bg btn i into thisName --check to see if there is help on this button if the short name of bg btn i = "info blanket" OR thisID = 216 OR thisID = 353 OR thisID = 313 OR thisName = "Card" OR thisName = "catalog" OR thisName = "management" OR thisName = "indexes" OR thisName = "lists view" or thisName = "graphics view" OR thisName = "menu blanket" then next repeat else --there is help on this button displayHelpBtn (the short name of bg btn i) end if end if end repeat --flds repeat with i = 1 to the number of bg flds if userLoc is within the rect of fld i then displayHelpFld (the short name of fld i) end if end repeat set cursor to 16 end if end repeat end mouseUp on displayHelpByID messageText,btnId if the visible of bg btn id btnId then displayHelp messageText else exit displayHelpByID end displayHelpByID on displayHelpFld messageText if the visible of fld messageText then displayHelp messageText else exit displayHelpFld end displayHelpFld on displayHelpBtn messageText if the visible of bg btn messageText then displayHelp messageText else exit displayHelpBtn end displayHelpBtn on displayHelp messageText put messageText into helpFunction put substitute("#","",helpFunction) into helpFunction put substitute(":","",helpFunction) into helpFunction put substitute("…","",helpFunction) into helpFunction put substitute(" ","",helpFunction) into helpFunction put "()" after helpFunction do "get" && helpFunction put it into fld "banner" end displayHelp on cleanExit set the icon of bg btn "Help Close" to 3358 showHelp false set the icon of bg btn "Help Close" to 3071 put empty into fld "banner" end cleanExit on menuHelp menu,btnName if the visible of bg btn btnName is false then exit menuHelp set hilite of bg btn btnName to true get menuPop("bg btn" && btnName) put item 1 of it into menuT put item 2 of it into menuL get BigPop(menu,menuT,menuL) set hilite of bg btn btnName to false if it is empty then exit menuHelp else displayHelp (line it of menu) end menuHelp ---------------------------------------------------------------------- --PASTE THE NEW HELP FUNCTIONS AFTER THIS LINE ---------------------------------------------------------------------- function PrintCardsfromBook return "Choose Print Cards from Book from the Management button to print all of the cards from a selected book." & return end PrintCardsfromBook function GoBack return "Click Go Back to return to cards you’ve previously been to." & return end GoBack function Hardware return "Apple Graphics Source is divided into three stacks: Hardware, Networks, and Technical. Click one of these buttons to go to that stack." & return end Hardware function Networks return "Apple Graphics Source is divided into three stacks: Hardware, Networks, and Technical. Click one of these buttons to go to that stack." & return end Networks function Technical return "Apple Graphics Source is divided into three stacks: Hardware, Networks, and Technical. Click one of these buttons to go to that stack." & return end Technical function AboutThisGraphic return "About This Graphic displays information about the current graphic (for example, it’s description, file name, keywords, etc.). " & return end AboutThisGraphic function AGSLists return "AGS Lists displays the open list and hides information about the current graphic." & return &return &"To add graphics to the open list, click Add This Graphic. To save a list, click Save. To go to a graphic in the list, click its entry in the list." & return end AGSLists function AssignKeyword return "Assign Keyword enables you to select an existing keyword or keywords to assign to the current graphic." & return end AssignKeyword function AssignBook return "Assign Book enables you to select an existing book to assign to the current graphic." & return end AssignBook function CardNumberBtn return "This button gives you information about your location in the stack. Click it as a short-cut to using Find to locate a card by its number." & return end CardNumberBtn function Quit return "Quit closes the stack and leaves HyperCard." & return end Quit function Find return "Click Find to search for graphics by different criteria (for example, File Name, Format, Keywords, etc.)" & return end Find function FindAgain return "Click Find Again to continue with your last search." & return end FindAgain function BuildAllIndexes return "Choose Build All Indexes to build all of the indexes in the stack." & return end BuildAllIndexes function BuildFileNameIndex return "Choose Build File Name Index to store all of the file names in an index. This needs to be done before you release the stack." & return end BuildFileNameIndex function BuildFileFormatIndex return "Choose Build File Format Index to store all of the file formats in an index. This needs to be done before you release the stack." & return end BuildFileFormatIndex function FormatDescription return "Choose Format Description to format the text in the description field. Formatting in this case means to put the first 31 characters followed by an ellipsis into the first" & return &"(visible) of the field. The entire description is stored in the rest of the field." & return end FormatDescription function Delete return "Click Delete # to delete entries from the open list." & return &return &"After you click Delete #,click on the list entries you want to remove. When you are finished deleting entries, click Done." & return end Delete function NewList return "New List opens a new, empty list named Untitled. If another list is already open, the stack closes it " & return &"(after prompting you to save changes) before opening a new list. Only one list can be open at a time." & return &return &"To add items to the list, click Add This Graphic to List (or press control-A). " & return end NewList function ListName return "This is the name of the open list." & return end ListName function DeleteList return "Delete List erases the list that you specify. Click Delete List when you no longer need a particular list." & return end DeleteList function PrintList return "Print List prints the open list. You can print a list along with the thumbnail sketches of the list items, or print just the text of the list (the descriptions and file name of the items)." & return end PrintList function Save return "Save saves a list to disk." & return end Save function FileName return "Click File Name as a short-cut to clicking Find and searching for graphics by File Name." & return end FileName function FileNameField return "Each graphic file is stored referred to in this stack is stored as a separate file. The name of this file is displayed in the File Name field." & return end FileNameField function List return "The List field displays the open list. Click an entry in the list to go to that graphic." & return end List function AppearsInBooks return "Click Appears In Books as a short-cut to clicking Find and searching for graphics by book." & return end AppearsInBooks function AppearsInBooksField return "The Appears in Books field displays the books (along with the books’ Engineering Part Numbers) in which this graphic appears." & return &return &"Click any of the books (or Engineering Part Numbers) to search forward for graphics from that book. To search backwards, hold down the Option key." & return end AppearsInBooksField function Keywords return "Click Keywords as a short-cut to clicking Find and searching for graphics by keyword." & return &return &return end Keywords function KeywordsField return "The Keywords field displays the keywords assigned to describe this graphic." & return &return &"Click any of the keywords to search forward for graphics with that keyword. To search backwards, hold down the Option key." & return &return end KeywordsField function Description return "Click Description as a short-cut to clicking Find and searching for graphics by description." & return end Description function DescriptionField return "The Description field displays the description of this graphic." & return &return &"Click this field to search forward for graphics with the same description as the current graphic. To search backwards, hold down the Option key." & return end DescriptionField function Format return "Click Format as a short-cut to clicking Find and searching for graphics by format." & return end Format function FormatField return "The Format field displays the file format (or file type) of this graphic. " & return &return &"Click this field to search forward for graphics that are stored in the same format as the current graphic. To search backwards, hold down the Option key." & return end FormatField function AddThisGraphic return "Add This Graphic puts the description and file name of the current graphic at the end of the open list. You can add up to 50 graphics to a list. As a short-cut to clicking this button, press control-A." & return &return &"You can continue to add graphics to the list, even if the list is hidden (as it is when information about the current graphic is visible)." & return end AddThisGraphic function OpenList return "Open List enables you to open a list you have saved. If another list is already open, the stack closes it " & return &"(after prompting you to save changes) before opening the specified list. Only one list can be open at a time." & return end OpenList function CatalogVolume return "Choose Catalog Volume to catalog all of the graphics on a volume (or disk). For each graphic found on the volume, a card is created in the" & return &" stack, the thumbnail is created, and the file name, file type, and file path are put into the appropriate fields." & return end CatalogVolume function CatalogFolder return "Choose Catalog Folder to catalog all of the within a specified folder. For each graphic found in the folder, a card is created in the" & return &" stack, a thumbnail is created, and the file name, file type, and file path are put into the appropriate fields." & return end CatalogFolder function CatalogFile return "Choose Catalog File to catalog a specified file. If the file is stored in an acceptable file format, a card is created in the stack, a thumbnail is " & return &"created, and the file name, file type, and file path are put into the appropriate fields." & return end CatalogFile function SetBrowsingSpeed return "Set Browsing Speed lets you change the speed of browsing and searching through graphics. " & return end SetBrowsingSpeed function ImportData return "Import Data allows you to add the graphics and text from a specified stack to the end of the open stack." & return end ImportData function SortbyFileName return "Sort by File Name sorts the graphic cards by their file name." & return end SortbyFileName function DeleteData return "Delete Data deletes all but one of the cards in the background The Collection. On the remaining card, the thumbnail is removed and the fields are emptied." & return end DeleteData function BuildKeywordIndex return "Build Keyword Index goes to every graphics card and collects all of the assigned keywords. The keywords are sorted and stored on the Title Card." & return end BuildKeywordIndex function BuildBookIndex return "Build Book Index goes to every graphics card and collects all of the assigned books. The books are sorted and stored on the Title Card." & return end BuildBookIndex function AddtoKeywordIndex return "Add to Keyword Index allows you to add new keywords to the Keyword Index." & return end AddtoKeywordIndex function DeleteKeyword return "Delete Keyword enables you to delete a keyword from the current card." & return end DeleteKeyword function DeleteBook return "Delete Book enables you to delete a book from the current card." & return end DeleteBook function DeletefromKeywordIndex return "Delete from Keyword Index enables you to delete a term from this index. After you select a term or terms, the stack finds each instance in the appropriate field" & return &" and confirms that you want to delete this term from this card. (To avoid the confirmation dialog box, hold down the Option key.)" & return end DeletefromKeywordIndex function AddtoBookIndex return "Add to Book Index allows you to add new books to the Book Index." & return end AddtoBookIndex function DeletefromBookIndex return "Delete from Book Index enables you to delete a term from this index. After you select a term or terms, the stack finds each instance in the appropriate field" & return &" and confirms that you want to delete this term from this card. (To avoid the confirmation dialog box, hold down the Option key.)" & return &return end DeletefromBookIndex function ExportKeywordIndex return "Export Keyword Index creates a text file of all keywords assigned to graphics." & return end ExportKeywordIndex function ExportBookIndex return "Export Book Index creates a text file of all books assigned to graphics." & return end ExportBookIndex function Next return "This is the Next Card button. Click it to see the next card in the stack, or click and hold down the mouse button to browse through the cards." & return &return &"To change the browsing speed of the stack, hold down the Command key and click the Next Card button or the Previous Card button." & return end Next function Prev return "This is the Previous Card button. Click it to see the previous card in the stack, or click and hold down the mouse button to browse through the cards. " & return &return &"To change the browsing speed of the stack, hold down the Command key and click the Next Card button or the Previous Card button." & return &return end Prev function OpenGraphic return "Click Open Graphic to see the original (full-size) version of the graphic on the current card." & return &return &"Once the original grahic is open, you can copy or print all, or a selection of, the graphic." & return end OpenGraphic function Banner return return &" Welcome to the Help Section" & return &return &"• Use the Help cursor (the question" & return &" mark) to click buttons and fields" & return &" to find out about them." & return &return &"• To leave Help and return to the " & return &" graphics, click the close box " & return &" of this panel." & return &return end Banner function HelpSection return return &" Welcome to the Help Section" & return &return &"• Use the Help cursor (the question" & return &" mark) to click buttons and fields" & return &" to find out about them." & return &return &"• To leave Help and return to the " & return &" graphics, click the close box " & return &" of this panel." & return &return end HelpSection function BuildThumbnail return "Build Thumbnail replaces any existing thumbnail sketch on the current card and pastes a new thumbnail sketch." & return end BuildThumbnail return "Build Thumbnail replaces any existing thumbnail sketch on the current card and pastes a new thumbnail sketch." & return end BuildThumbnail function GoBack return "Click Go Back to return to cards you’ve previously been to." & return end GoBack function Hardware return "Apple Graphics Source is divided into three stacks: Hardware, Networks, and Technical. Click one of these buttons to go to that stack." & return end Hardware function Networks return "Apple Graphics Source is divided into three stacks: Hardware, Networks, and Technical. Click one of these buttons to go to that stack." & return end Networks function Technical return "Apple Graphics Source is divided into three stacks: Hardware, Networks, and Technical. Click one of these buttons to go to that stack." & return end Technical function AboutThisGraphic return "About This Graphic displays information about the current graphic (for example, it’s description, file name, keywords, etc.). " & return end AboutThisGraphic function AGSLists return "AGS Lists displays the open list and hides information about the current graphic." & return &return &"To add graphics to the open list, click Add This Graphic. To save a list, click Save. To go to a graphic in the list, click its entry in the list." & return end AGSLists function AssignKeyword return "Assign Keyword enables you to select an existing keyword or keywords to assign to the current graphic." & return end AssignKeyword function AssignBook return "Assign Book enables you to select an existing book to assign to the current graphic." & return end AssignBook function CardNumberBtn return "This button gives you information about your location in the stack. Click it as a short-cut to using Find to locate a card by its number." & return end CardNumberBtn function Quit return "Quit closes the stack and leaves HyperCard." & return end Quit function Find return "Click Find to search for graphics by different criteria (for example, File Name, Format, Keywords, etc.)" & return end Find function FindAgain return "Click Find Again to continue with your last search." & return end FindAgain function BuildAllIndexes return "Choose Build All Indexes to build all of the indexes in the stack." & return end BuildAllIndexes function BuildFileNameIndex return "Choose Build File Name Index to store all of the file names in an index. This needs to be done before you release the stack." & return end BuildFileNameIndex function BuildFileFormatIndex return "Choose Build File Format Index to store all of the file formats in an index. This needs to be done before you release the stack." & return end BuildFileFormatIndex function FormatDescription return "Choose Format Description to format the text in the description field. Formatting in this case means to put the first 31 characters followed by an ellipsis into the first" & return &"(visible) of the field. The entire description is stored in the rest of the field." & return end FormatDescription function Delete return "Click Delete # to delete entries from the open list." & return &return &"After you click Delete #,click on the list entries you want to remove. When you are finished deleting entries, click Done." & return end Delete function NewList return "New List opens a new, empty list named Untitled. If another list is already open, the stack closes it " & return &"(after prompting you to save changes) before opening a new list. Only one list can be open at a time." & return &return &"To add items to the list, click Add This Graphic to List (or press control-A). " & return end NewList function ListName return "This is the name of the open list." & return end ListName function DeleteList return "Delete List erases the list that you specify. Click Delete List when you no longer need a particular list." & return end DeleteList function PrintList return "Print List prints the open list. You can print a list along with the thumbnail sketches of the list items, or print just the text of the list (the descriptions and file name of the items)." & return end PrintList function Save return "Save saves a list to disk." & return end Save function FileName return "Click File Name as a short-cut to clicking Find and searching for graphics by File Name." & return end FileName function FileNameField return "Each graphic file is stored referred to in this stack is stored as a separate file. The name of this file is displayed in the File Name field." & return end FileNameField function List return "The List field displays the open list. Click an entry in the list to go to that graphic." & return end List function AppearsInBooks return "Click Appears In Books as a short-cut to clicking Find and searching for graphics by book." & return end AppearsInBooks function AppearsInBooksField return "The Appears in Books field displays the books (along with the books’ Engineering Part Numbers) in which this graphic appears." & return &return &"Click any of the books (or Engineering Part Numbers) to search forward for graphics from that book. To search backwards, hold down the Option key." & return end AppearsInBooksField function Keywords return "Click Keywords as a short-cut to clicking Find and searching for graphics by keyword." & return &return &return end Keywords function KeywordsField return "The Keywords field displays the keywords assigned to describe this graphic." & return &return &"Click any of the keywords to search forward for graphics with that keyword. To search backwards, hold down the Option key." & return &return end KeywordsField function Description return "Click Description as a short-cut to clicking Find and searching for graphics by description." & return end Description function DescriptionField return "The Description field displays the description of this graphic." & return &return &"Click this field to search forward for graphics with the same description as the current graphic. To search backwards, hold down the Option key." & return end DescriptionField function Format return "Click Format as a short-cut to clicking Find and searching for graphics by format." & return end Format function FormatField return "The Format field displays the file format (or file type) of this graphic. " & return &return &"Click this field to search forward for graphics that are stored in the same format as the current graphic. To search backwards, hold down the Option key." & return end FormatField function AddThisGraphic return "Add This Graphic puts the description and file name of the current graphic at the end of the open list. You can add up to 50 graphics to a list. As a short-cut to clicking this button, press control-A." & return &return &"You can continue to add graphics to the list, even if the list is hidden (as it is when information about the current graphic is visible)." & return end AddThisGraphic function OpenList return "Open List enables you to open a list you have saved. If another list is already open, the stack closes it " & return &"(after prompting you to save changes) before opening the specified list. Only one list can be open at a time." & return end OpenList function CatalogVolume return "Choose Catalog Volume to catalog all of the graphics on a volume (or disk). For each graphic found on the volume, a card is created in the" & return &" stack, the thumbnail is created, and the file name, file type, and file path are put into the appropriate fields." & return end CatalogVolume function CatalogFolder return "Choose Catalog Folder to catalog all of the within a specified folder. For each graphic found in the folder, a card is created in the" & return &" stack, a thumbnail is created, and the file name, file type, and file path are put into the appropriate fields." & return end CatalogFolder function CatalogFile return "Choose Catalog File to catalog a specified file. If the file is stored in an acceptable file format, a card is created in the stack, a thumbnail is " & return &"created, and the file name, file type, and file path are put into the appropriate fields." & return end CatalogFile function SetBrowsingSpeed return "Set Browsing Speed lets you change the speed of browsing and searching through graphics. " & return end SetBrowsingSpeed function ImportData return "Import Data allows you to add the graphics and text from a specified stack to the end of the open stack." & return end ImportData function SortbyFileName return "Sort by File Name sorts the graphic cards by their file name." & return end SortbyFileName function DeleteData return "Delete Data deletes all but one of the cards in the background The Collection. On the remaining card, the thumbnail is removed and the fields are emptied." & return end DeleteData function BuildKeywordIndex return "Build Keyword Index goes to every graphics card and collects all of the assigned keywords. The keywords are sorted and stored on the Title Card." & return end BuildKeywordIndex function BuildBookIndex return "Build Book Index goes to every graphics card and collects all of the assigned books. The books are sorted and stored on the Title Card." & return end BuildBookIndex function AddtoKeywordIndex return "Add to Keyword Index allows you to add new keywords to the Keyword Index." & return end AddtoKeywordIndex function DeleteKeyword return "Delete Keyword enables you to delete a keyword from the current card." & return end DeleteKeyword function DeleteBook return "Delete Book enables you to delete a book from the current card." & return end DeleteBook function DeletefromKeywordIndex return "Delete from Keyword Index enables you to delete a term from this index. After you select a term or terms, the stack finds each instance in the appropriate field" & return &" and confirms that you want to delete this term from this card. (To avoid the confirmation dialog box, hold down the Option key.)" & return end DeletefromKeywordIndex function AddtoBookIndex return "Add to Book Index allows you to add new books to the Book Index." & return end AddtoBookIndex function DeletefromBookIndex return "Delete from Book Index enables you to delete a term from this index. After you select a term or terms, the stack finds each instance in the appropriate field" & return &" and confirms that you want to delete this term from this card. (To avoid the confirmation dialog box, hold down the Option key.)" & return &return end DeletefromBookIndex function ExportKeywordIndex return "Export Keyword Index creates a text file of all keywords assigned to graphics." & return end ExportKeywordIndex function ExportBookIndex return "Export Book Index creates a text file of all books assigned to graphics." & return end ExportBookIndex function Next return "This is the Next Card button. Click it to see the next card in the stack, or click and hold down the mouse button to browse through the cards." & return &return &"To change the browsing speed of the stack, hold down the Command key and click the Next Card button or the Previous Card button." & return end Next function Prev return "This is the Previous Card button. Click it to see the previous card in the stack, or click and hold down the mouse button to browse through the cards. " & return &return &"To change the browsing speed of the stack, hold down the Command key and click the Next Card button or the Previous Card button." & return &return end Prev function OpenGraphic return "Click Open Graphic to see the original (full-size) version of the graphic on the current card." & return &return &"Once the original grahic is open, you can copy or print all, or a selection of, the graphic." & return end OpenGraphic function Banner return return &" Welcome to the Help Section" & return &return &"• Use the Help cursor (the question" & return &" mark) to click buttons and fields" & return &" to find out about them." & return &return &"• To leave Help and return to the " & return &" graphics, click the close box " & return &" of this panel." & return &return end Banner function HelpSection return return &" Welcome to the Help Section" & return &return &"• Use the Help cursor (the question" & return &" mark) to click buttons and fields" & return &" to find out about them." & return &return &"• To leave Help and return to the " & return &" graphics, click the close box " & return &" of this panel." & return &return end HelpSection